﻿using System.Collections.Generic;
using System.Windows.Forms;

namespace DeVierKoeden.Dynamicweb.CreateSite
{
  /// <summary>
  /// Helper form to display lines of text.
  /// </summary>
  public partial class TextViewer : Form
  {
    private IEnumerable<string> _lines;

    /// <summary>
    /// Accepts the lines that needs to be displayed in the text control.
    /// </summary>
    public IEnumerable<string> Lines
    {
      get
      {
        return _lines;
      }
      set
      {
        _lines = value;
        LinesBox.Clear();
        foreach (string line in _lines)
        {
          LinesBox.AppendText(line + "\r\n");
        }
      }
    }
    /// <summary>
    /// Creates a new instance of the TextViewer class.
    /// </summary>
    public TextViewer()
    {
      InitializeComponent();
    }
  }
}
